package com.hnust.dao;

import com.hnust.domain.Examinee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface StudentDao {
    //获取学生列表
    @Select("select stu.stu_id,stu.studentName stuName,stu.stu_number stuNumber,rd.total_score score,rd.status status,rd.answer_time time,stu.sex " +
            "from student stu,result_detail rd  " +
            "where stu.stu_number = rd.studentId and rd.testId = #{testId} and stu.cls_id = #{claId} ")
    @ResultType(Examinee.class)
    List<Examinee> queryStudentInfo(String testId, String claId);
}
